/**
 * Resourece
 * @ 旋涡
 */
import { Base } from "@/pixi/base";
class Resourece extends Base {
  Resourece: any[];
  getSprites: any;
  isRendering: boolean;
  position: object | string;
  anchor: object | string;
  constructor() {
    super();
    this.Resourece = [];
    this.getSprites = {};
    this.load();
    this.position = { x: 4902, y: 0 };
    // this.position = { x: -300, y: 0 };
    this.anchor = "center";
    this.isRendering = true;
  }
  load() {
    // 遍历资源
    for (let i = 1; i <= 52; i++) {
      this.Resourece.push({
        name: `vortex${i}`,
        url: require(`@/${this.baseUrl}/images/x${i}.png`),
      });
    }
    // 设置精灵
    for (let i = 1; i <= 52; i++) {
      this.getSprites[`vortex${i}`] = {
        key: `vortex${i}`,
        size: { mode: "heightFit", height: 1 },
        position: "center",
        anchor: "center",
        alpha: '1'
      };
    }
  }
}
export default new Resourece();
